import java.io.*;
import java.util.Random;
import org.kwis.msp.lcdui.Card;
import org.kwis.msp.lcdui.Display;
import org.kwis.msp.lcdui.Image;
import org.kwis.msp.lcdui.Graphics;
import org.kwis.msp.lcdui.EventQueue;

class TetrisCard extends Card {
    private Image gameoverImg;
    private Image scoreNumImg[];
    private Image scorePanelImg;
    private Image nextPanelImg;

    public TetrisCard() {
        try {
            gameoverImg = Image.createImage("/gmov.png");       // 이미지 초기화
            scorePanelImg = Image.createImage("/score.png");
           nextPanelImg = Image.createImage("/next.png");
            scoreNumImg = new Image[10];
            for(int i = 0; i < 10; i++)
                scoreNumImg[i] = Image.createImage("/" + i + ".png");
        } catch(IOException e) {
            System.out.println("LOAD Error : " + e);
        }

    }
    
	private void showScorePanel(Graphics g) {
        g.drawImage(scorePanelImg, 65, 50, g.LEFT | g.TOP);
    }

    private void showNextPanel(Graphics g) {
        g.drawImage(nextPanelImg, 65, 10, g.LEFT | g.TOP);
    }
    
    protected  void paint(Graphics g) {
        g.setColor(0, 0, 0);   // 배경 색상 지정(검정색)
        g.fillRect(0, 0, getWidth(), getHeight());   // 배경 색칠
        g.setColor(255, 255, 0);   // 오른쪽 경계선 그리기
        g.drawLine(62, 10, 62, getHeight());
        showScorePanel(g);    // 점수판 그리기
        showNextPanel(g);     // next판 그리기
    }
}


